using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public abstract class Panel_Base : Singleton_Base
{
    public static Panel_Base currentActivePanel;

    protected virtual void OnEnable()
    {
        if (currentActivePanel != null)
        {
            currentActivePanel.gameObject.SetActive(false);
        }
        currentActivePanel = this;
    }
    private void OnDisable()
    {
        if (currentActivePanel == this)
        {
            currentActivePanel = null;
        }
    }
}